1. Field of the Invention
The present invention relates to an information reproduction system for optically reading a code pattern from an information recording medium such as paper, on which so-called multimedia information including, e.g., audio information, video information, and digital code data is recorded as an optically readable pattern code, and for reproducing the original multimedia information. More particularly, the present invention relates to a threshold determination/binarization circuit for performing a threshold setting operation for binarization processing in binarizing an image signal representing a read two-dimensional code pattern.
2. Description of the Related Art
As media for recording speech information, music information, and the like, a magnetic tape, an optical disk, and the like are generally known. However, even if copies of these media are produced in large quantities, the unit cost of production is relatively high, and storage of such copies requires a large space.
In addition, when a medium on which speech information is recorded needs to be handed to a person in a remote place, it takes much labor and time to mail or directly take the medium to the person.
So-called multimedia information other than audio information, including video information obtained by a camera, video equipment or the like, and digital code data obtained from a personal computer, wordprocessor, or the like have the same problems.
As means for solving such problems, PCT Appln. Publication WO 94/08314 (corresponding to U.S. Pat. Application 08/407,018) discloses a system which can fax multimedia information including at least one of audio information, video information, and digital code data, produce copies of such information in large quantities at a low cost, and record image information, i.e., code information, on an information recording medium such as paper, in the form of a two-dimensional code pattern having a plurality of dots two-dimensionally arranged, and a system for reproducing such information.
A dot code as a two-dimensional code pattern is described in this publication. According to the data format of this dot code, one block consists of a marker, a block address, address error detection and error correction data, and a data area in which actual data is written. Such blocks are two-dimensionally arranged in the vertical and horizontal directions. A dot code is made of a collection of these blocks.
FIG. 38 shows the arrangement of a multimedia information reproduction apparatus disclosed in the above publication.
This information reproduction apparatus comprises a detection section 184 for reading a dot code from a sheet 182 on which a dot code 170 is printed, a scan conversion section 186 for recognizing image data supplied from the detection section 184 as a dot code and normalizing it, a binarization processing section 188 for converting multivalue data into binary data, a demodulating section 190, an adjusting section 192 for adjusting a data string, a data error correction section 194 for correcting a read error in a reproducing operation and a data error, a data separation section 196 for separating data in accordance with their attributes, expansion processing sections for performing expansion processes for data compression processes in accordance with the attributes of data, and a display or reproduction unit, and other input devices.
In the detection section 184, the dot code 170 on the sheet 182 is illuminated with a light source 198, and reflected light is incident on an image pickup portion 204 such as a CCD or a CMD via an imaging optical system 200 such as a lens and a spatial filter 202 for removing moire and the like. The image pickup portion 204 converts the information of the incident light into an electrical signal as an image signal. The image signal is then amplified by a preamplifier 206 to be output.
The light source 198, the imaging optical system 200, the spatial filter 202, the image pickup portion 204, and the preamplifier 206 are arranged in an external light shielding section 208 for preventing disturbance caused by external light. The image signal amplified by the preamplifier 206 is converted into digital information by an A/D conversion section 210 and supplied to the scan conversion section 186 on the next stage.
Note that the image pickup portion 204 is controlled by an image pickup portion control section 212. Assume that a CCD of an interline transfer scheme is to be used as the image pickup portion 204. In this case, the image pickup portion control section 212 outputs the following control signals to the image pickup portion 204: a vertical blanking signal for vertical synchronization; an image pickup element reset pulse signal for resetting information charges; a charge transfer gate pulse signal for transferring charges stored in a two-dimensionally arrayed charge transfer/storage section to a plurality of vertical shift registers; a horizontal charge transfer CLK signal as a transfer clock signal for a horizontal shift register for transferring charges in the horizontal direction and externally outputting them; a vertical charge transfer pulse signal for transferring the charges from the vertical shift registers in the vertical direction and supplying them to the horizontal shift register, and the like.
The image pickup portion control section 212 supplies an emission cell control pulse to the light source 198 to adjust the emission timing of the light source 198 in accordance with the read timing of the image pickup portion 204.
Image data is read out in the time interval of one field between one blanking timing and another. Instead of continuously lighting the light source 198, a periodic flickering operation (pulse lighting operation) is performed, and subsequent flickering operations are performed while synchronization is established in units of fields. In this case, the exposure timing is controlled to perform exposure during the vertical blanking period, i.e., a period during which no image charges are output, in order to prevent clock noise caused by the above flickering operation from mixing with the signal output. That is, an emission cell control pulse, which is a very fine digital clock pulse which is generated instantaneously, serves to supply large power to the light source. For this reason, some measure must be taken to prevent noise from mixing with the analog image signal. For this reason, pulse lighting of the light source is performed during the vertical blanking period. With this operation, the S/N ratio can be increased. In addition, flickering at predetermined intervals (pulse lighting) shortens the emission time. Therefore, the influences of a shake caused by a manual operation and blurring caused by movement of the apparatus can be eliminated. This allows a high-speed scanning operation.
In addition, assume that the reproduction apparatus tilts, and disturbance such as external light enters in spite of the external light shielding section 208. Even in this case, in order to minimize a decrease in S/N ratio, an image pickup element reset pulse is output to reset an image signal once before the light source 198 is caused to emit light during a vertical blanking period, and emission of light is performed immediately after resetting of this image signal. A data read operation is performed immediately after this operation.
The scan conversion section 186 will be described next. The scan conversion section 186 is a section for recognizing image data supplied from the detection section 184 as a dot code, and normalizing it. As a technique for this operation, the image data from the detection section 184 is stored in an image memory 214, read out therefrom temporarily, and supplied to a marker detection section 216. The marker detection section 216 detects a marker of each block.
A data array direction detection section 218 detects any rotation or inclination and the array direction of the data by using the markers. An address control section 220 reads out image data from the image memory 214 and supplies the data to an interpolation circuit 222 so as to correct it in accordance with the detection result. At this time, lens aberration information is read out from a memory 224 for correcting the distortion of the aberration of the lens of the imaging optical system 200 of the detection section 184, thereby performing lens correction as well. The interpolation circuit 222 performs interpolation processing of the image data to convert it into an original pattern, i.e., a dot code.
An output from the interpolation circuit 222 is supplied to the binarization processing section 188. The dot code 170 is basically a black and white pattern, i.e., binary information. Therefore, the data is converted into binary data by the binarization processing section 188.
At this time, binarization is adaptively performed while threshold determination is performed by a threshold determination circuit 226 in consideration of the influences of disturbance, signal amplitude, and the like.
Since modulation has been performed in the recording operation, the demodulating section 190 demodulates the data, and inputs the resultant data to the data string adjusting section 192.
In the data string adjusting section 192, the block addresses of the above two-dimensional blocks are detected by a block address detection section 228 first, and error detection and correction of the block addresses are then performed by a block address error detection/correction section 230. Thereafter, an address control section 232 stores the resultant data in a data memory section 234 in units of blocks. By storing the data in units of block addresses in this manner, the data can be efficiently stored even if an intermediate data portion is omitted or data starts from an intermediate data portion.
After this operation, error correction of the data read out from the data memory section 234 is performed by the data error correction section 194. An output from the data error correction section 194 is branched to two ways. One output is supplied, as digital data, to a personal computer, a wordprocessor, an electronic notebook, or the like via an I/F 236. The other output is supplied to the data separation section 196 to be separated into image data, handwritten character or graph data, character or line drawing data, and sound data (including two types, i.e., sound data without any processing and data having undergone speech synthesis).
Image data corresponds to natural image data, which is multivalue image data. An expansion processing section 238 performs expansion processing of this data, which corresponds to JPEG in data compression. In a data interpolation circuit 240, data for which error correction cannot be performed is interpolated.
For binary image information relating to a handwritten character or a graph, an expansion processing section 242 performs expansion processing corresponding to MR/MH/MMR or the like in data compression. In a data interpolation circuit 244, data for which error correction cannot be performed is interpolated.
Character or line drawing data is converted into a different pattern for display by a PDL (Page-Description Language) processing section 246. Note that even line drawing or character information which has been coded and undergone compression processing for a code is subjected to corresponding expansion (Huffman coding, Ziv-Lempel, or the like) processing in an expansion processing section 248, and is supplied to the PDL processing section 246.
Outputs from the data interpolation circuits 240 and 244 and the PDL processing section 246 are synthesized or selected by a synthesizing/switching circuit 250. The resultant data is converted into an analog signal by a D/A conversion section 252. Thereafter, the corresponding information is displayed on a display unit 254 such as a CRT (TV monitor) or an FMD (face-mounted display). Note that the FMD is a glass-type monitor (handy monitor) to be mounted on the face of the user, and can be effectively used for, e.g., a virtual reality operation or looking at an image on a large frame in a narrow place.
Speech information is subjected to expansion processing in an expansion processing section 256, which corresponds to ADPCM. Furthermore, in a data interpolation circuit 258, data for which error correction cannot be performed is interpolated. In performing speech synthesis, a speech synthesis section 260 receives a code for speech synthesis, actually synthesizes speech from the code, and outputs it. In this case, if the code itself is compressed, speech synthesis is performed after expansion processing such as Huffman coding or Ziv-Lempel processing is performed in an expansion processing section 262, as in the case of the above character or line drawing information. Outputs from the data interpolation circuit 258 and the speech synthesis section 260 are synthesized or selected by a synthesizing/switching circuit 264. The resultant data is then converted into an analog signal by a D/A conversion section 266. The signal is output to a loudspeaker, a headphone or a speech output unit 268 equivalent thereto.
Character or line drawing information is directly output from the data separation section 196 to a page printer or plotter 270. As a result, the character information can be printed, as wordprocessor characters, on a paper sheet, or the line drawing information can be output, as a drawing, from a plotter. As is apparent, image information can also be printed by a video printer as well as being displayed on a CRT or an FMD, or the image can be photographed.
In this information reproduction apparatus, for example, the detection section 184 and the scan conversion section 186 are stored in a pen type housing to constitute a reading section for optically reading the dot code 170. The user traces the dot code 170 with this reading section in his/her hand.
In the above information reproduction system, an output from the interpolation circuit 222 is binarized by the binarization processing section 188. At this time, binarization is adaptively performed while threshold determination is performed by the threshold determination circuit 226 in consideration of the influences of disturbance, signal amplitude, and the like.
When a threshold is determined by the threshold determination circuit 226, the actually read maximum and minimum values vary. That is, the density of an ink and the diameter of a dot vary because of illumination irregularity in reproduction processing, variations in quality of printing paper, and exposure amount errors in printing processing if printing paper is exposure paper. For this reason, as shown in FIGS. 39A to 39E, an original rectangular signal a representing a reference dot, which is should be obtained, is degraded to become a degraded signal b or c having a signal width different from that of the original signal.
When, therefore, the original signal is detected as the degraded signal b, a signal width dn based on the read value becomes smaller than a predetermined standard signal width dr, as shown in FIG. 39D. If the original signal is detected as the degraded signal c, a signal width dn based on the read value becomes larger than a predetermined standard signal width dr, as shown in FIG. 39E. In reality, a threshold for an optimal signal width is not obtained.
As described above, while a threshold for providing a standard signal width has an error, read data is binarized in the subsequent processing.
Jpn. Pat. Appln. KOKAI Publication No. 57-132278 discloses a technique of determining slice levels in units of black bars, as a binarization processing means, in bar codes, and performing arithmetic processing of identical black bars by using the previous slice level up to a predetermined space width. That is, a threshold for binarization is determined with reference to a space area (white area).
In determining a threshold for binarization in the technique disclosed in Jpn. Pat. Appln. KOKAI Publication No. 57-132278, if noise is caused by dust in a space area between bar codes, the presence of the dust can be eliminated by decreasing the threshold. However, the widths of the subsequent bar codes decrease, so that the standard space area width cannot be maintained.
Furthermore, a threshold cannot be set at once. Rather, set values for the space areas between bar codes sequentially approach a standard value (optimal value) in a trial-and-error manner. Thus, it takes much time to reach the standard value, and a high-precision threshold cannot be obtained.
According to the binarization threshold determination technique disclosed in Jpn. Pat. Appln. KOKAI Publication No. 63-171477, a predetermined pulse width is compared with the pulse width of an output signal, and one of a plurality of predetermined pulse widths which is nearest to the pulse width of the output signal is selected. Therefore, a threshold does not coincide with an optimal value unless a predetermined pulse width accidentally coincides with the pulse width of an output signal. That is, a threshold having an error is inevitably set. In order to select an optimal value, a plurality of comparison results must be simultaneously output, resulting in a large circuit scale.